/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.myapp.struts.action;

import com.myapp.bo.WantEsBO;
import com.myapp.dbdao.WantEsDBDAO;
import java.sql.Connection;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 *
 * @author toint
 * @since 12/2013
 * @version 1.0
 */
public class RedirectAddEstimate5bAction extends Action {

    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form, 
            HttpServletRequest req, HttpServletResponse res) throws Exception {
        
        try {
            List<WantEsBO> lstWantEs = WantEsDBDAO.lstWants(2);
            req.setAttribute("lstWant", lstWantEs);
        } catch (Exception ex) {
            return mapping.findForward("");
        }
        return mapping.findForward("addEstimate5b");
    }
    
}
